package com.study.结构型模式.享元模式;

public class Client {

    public static void main(String[] args) {

        WebSiteFactory webSiteFactory = new WebSiteFactory();

        //新闻形式的网站
        WebSite webSite1 = webSiteFactory.getWebSite("新闻");
        webSite1.use(new User("傻逼"));

        //博客形式的网站
        WebSite webSite2 = webSiteFactory.getWebSite("博客");
        webSite1.use(new User("呆逼"));

        int webSiteCount = webSiteFactory.getWebSiteCount();
        System.out.println(webSiteCount);
    }
}
